/**
 * 
 */
package com.ap.paymentdetails;

import static com.ap.datagen.core.Nullable.nullable;

import com.ap.core.cxf.jaxb.paymentdetails.AbstractPaymentStatusTypeGeneratorBuilder;
import com.ap.core.cxf.jaxb.paymentdetails.PaymentStatusType;
import com.ap.core.cxf.jaxb.paymentdetails.TransactionStatusCode;
import com.ap.datagen.Generator;
import com.ap.generator.common.FieldGenerator;

/**
 * @author Rohit.Dixit
 *
 */
public class PaymentStatusTypeGeneratorBuilder extends
AbstractPaymentStatusTypeGeneratorBuilder {

	/* (non-Javadoc)
	 * @see com.ap.xsd.paymentdetails.AbstractPaymentStatusTypeGeneratorBuilder#setupDefaults()
	 */
	@Override
	public void setupDefaults() {
		this.txnStatusGenerator = FieldGenerator.TXNSTATUSCODEGENERATOR;
		this.txnStatusCodeGenerator = FieldGenerator.SUCCESSTXNSTATUSCODEGENERATOR;
		
		this.currencyGenerator = FieldGenerator.CURRENCYGENERATOR;		
		this.totalPaymentReqAmountGenerator = FieldGenerator.AMOUNTGENERATOR;
		this.pymtDecTimestampGenerator = FieldGenerator.TIMESTAMPGENERATOR;
	}

	/**
	 * 
	 * @return
	 */
	public static  PaymentStatusTypeGeneratorBuilder getPaymentStatusTypeGeneratorBuilder() {
		return new PaymentStatusTypeGeneratorBuilder();
	}

	/**
	 * 
	 * @return
	 */
	public PaymentStatusType getPaymentStatusType() {
		PaymentStatusType paymentStatusType = getPaymentStatusTypeGeneratorBuilder().build().generate();

		return paymentStatusType;
	}


	public PaymentStatusTypeGeneratorBuilder withTxnStatusCodeGenerator(Generator<TransactionStatusCode> txnStatusCodeGenerator){
		this.txnStatusCodeGenerator =  nullable(txnStatusCodeGenerator);
		return this;
	}

}
